import moment from 'moment';

export const DATA_TIME_ZONE:string = 'YYYY-MM-DDTHH:mm:ss+0800';
export const DATA_DATE:string = 'YYYY-MM-DD';
export const convertDateTimeToServer:(date:string|Date|moment.Moment) => string|null = (date) => (
  date ? moment(date).format(DATA_TIME_ZONE) : null
);
export const convertDateToServer:(date:string|Date|moment.Moment) => string|null = (date) => (
  date ? moment(date).format(DATA_DATE) : null
);

export default DATA_TIME_ZONE;
